#pragma once
#include <atomic>
#include <thread>
#include <stdint.h>
#include <list>
#include <vector>
#include <sys/epoll.h>

class LogPublish {
public:
    LogPublish();
    ~LogPublish();

    int init();
    int deinit();
    int start();
    int stop();

private:
    std::atomic_bool m_loop_run;
    std::thread m_th_publish;

    // 网络
    static const int OPEN_MAX{1024};
    const uint16_t SOCK_PORT{9009};
    const int RECV_BUFF_MAX{1024};
    
    int m_sock_fd;
    // int m_fds[OPEN_MAX]{-1};
    std::list<int> m_fds;
};